<?php

namespace app\models;

use yii\db\ActiveRecord;

/**
 * 代理商套餐
 * Class AgentPackage
 * @package app\models
 *
 * @property integer $id PK
 * @property integer $agent_id 代理商编号
 * @property integer $package_id 套餐编号
 * @property integer $use_pool 是否使用流量池
 * @property float $cost_price 成本价
 * @property float $sale_price 销售价
 *
 * @property Package $package 关联套餐
 */
class AgentPackage extends ActiveRecord
{
    /**
     * 关联套餐
     * @return \yii\db\ActiveQuery
     */
    public function getPackage()
    {
        return $this->hasOne(Package::class, ['id' => 'package_id']);
    }
}
